<?php

namespace home\models;

class BlogModel extends \Model {
	/**
	 * #varchar(50)#primary key#
	 *
	 * @var string
	 */
	public $id;
	/**
	 * #text#not null#
	 *
	 * @var string
	 */
	public $title;
	/**
	 * #text#
	 *
	 * @var string
	 */
	public $content;
	/**
	 * #int(10)#default 1#
	 *
	 * @var int
	 */
	public $version;
	/**
	 * #varchar(50)#
	 *
	 * @var string
	 */
	public $create_time;
	function __construct() {
		parent::__construct ();
	}
	function getPage($page, $pageSize) {
		return $this->field ( '*' )->orderBy ( 'create_time' )->page ( $page, $pageSize )->select ();
	}
}